<%@page import="com.qunar.base.meerkat.web.UserValueObject"%>
<%@page import="com.qunar.common.admin.model.Resource"%>
<%@page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="web" uri="http://meerkat.qunar.com/web"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理后台</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<web:designCss />
<script type="text/javascript" src="../static/js/jquery.js"></script>
<script type="text/javascript" src="../static/js/plugins/jstree/jquery.jstree.js"></script>
</head>
<body>
    <div class="wrapper">
        <div id="top-bar">
            <span class="menu-bar">
                <a href="javascript: view('/system/default.htm');" class="button button-blue">HOME</a>
                <a href="../logon/logoff.htm" class="button button-red">退出</a>
            </span> 
        </div>
        <div class="header-bar">
            <div class="header content clearfix">
                <span class="logo" />
            </div>
        </div>
        <div class="main-content-container">
            <div id="sidebar">
                <div id="side-menu" style="overflow-y:auto"></div>
            </div>
            <div id="viewpane">
                <iframe id="view-page" class="autoHeight" width="100%" frameborder="0" scrolling="auto" src="default.htm"></iframe>
            </div>
        </div>
        <div class="footer-bar">
            <div class="footer content clearfix">
              <ul>
                  <li>&copy;2012 Qunar</li>
              </ul>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#side-menu").jstree({
                "core" : {
                    "animation" : 0
                },
                "themes" : {
                    "theme": "classic",
                    "dots" : false
                },
                "json_data" : {
                    "ajax" : {
                        "url" : "menus.htm"
                    }
                },
                "plugins" : [ "themes", "json_data", "ui" ]
            }).bind("select_node.jstree", function(e, data) {
                var location = data.rslt.obj.attr("href");
                if (location == '#') {
                	this.addClass("opened");
                } else {
                    view(location);
                }
            });

            $('#view-page', parent.document.body).height($(document.body).height() - 160);
        });

        function view(location) {
            $('#view-page').attr('src', location)
        }
    </script>
</body>
</html>
